package com.seteam.collabcrossword.messages.client;

import com.seteam.collabcrossword.Globals;
import com.seteam.collabcrossword.messages.Message;

import java.io.Serializable;
import java.net.InetAddress;

/**
 * This message is used to request for a connection
 */
public class Connect implements Serializable, Message {
    private static final long serialVersionUID = 4665898137626412156L;
    private InetAddress clientIP;

    /**
     * Constructor
     *
     * @param clientIP the IP address of the client
     */
    public Connect(final InetAddress clientIP) {
        this.clientIP = clientIP;
    }

    /**
     * Getter for clientIP
     *
     * @return the client's IP address
     */
    public InetAddress getClientIP() {
        return clientIP;
    }

    /**
     * {@inheritDoc}
     */
    public String getAction() {
        return Globals.CONNECT;
    }
}
